package com.yuneec.droneservice.parse;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by jw.gu on 2016/10/28 0028.
 */

public class WaypointCameraMission implements Parcelable {
    public static final int CAMERA_ACTION_TAKE_PHOTO = 0;
    public static final int CAMERA_ACTION_RECORD = 1;
    public int waypointIndex;
    public int missionIndex;
    public int cameraAction;
    public int recordTime;

    public WaypointCameraMission() {

    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(waypointIndex);
        parcel.writeInt(missionIndex);
        parcel.writeInt(cameraAction);
        parcel.writeInt(recordTime);
    }

    public WaypointCameraMission(Parcel source) {
        waypointIndex = source.readInt();
        missionIndex = source.readInt();
        cameraAction = source.readInt();
        recordTime = source.readInt();
    }

    public static final Creator<WaypointCameraMission> CREATOR = new Creator<WaypointCameraMission>() {

        @Override
        public WaypointCameraMission createFromParcel(Parcel source) {
            return new WaypointCameraMission(source);
        }

        @Override
        public WaypointCameraMission[] newArray(int size) {
            return new WaypointCameraMission[size];
        }
    };

    public void readFromParcel(Parcel source) {
        waypointIndex = source.readInt();
        missionIndex = source.readInt();
        cameraAction = source.readInt();
        recordTime = source.readInt();
    }
}
